package org.dromara.tearoom.domain.bo;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import io.github.linpeilie.annotations.AutoMapper;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import org.dromara.tearoom.domain.TerOrder;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;
import java.util.List;


/**
 * 订单业务对象 ter_order
 *
 * @author xch
 * @date 2025-03-29
 */
@Data
@AutoMapper(target = TerOrder.class, reverseConvertGenerate = false)
public class TerOrderBo  {

    /**
     * 订单id
     */
    @NotBlank(message = "订单id", groups = {EditGroup.class })
    private String id;

    /**
     * 开放平台id
     */
    @NotNull(message = "openid不能为空", groups = { AddGroup.class})
    private String openId;

    /**
     * 茶室名称
     */
    @NotBlank(message = "茶室名称不能为空", groups = { AddGroup.class})
    private String tearoomName;

    /**
     * 茶室id
     */
    @NotNull(message = "茶室id不能为空", groups = { AddGroup.class})
    private Long tearoomId;


    /**
     * 入住开始日期时间
     */
    @NotNull(message = "入住开始日期时间不能为空")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime startTime;

    /**
     * 入住结束日期时间
     */
    @NotNull(message = "入住结束日期时间不能为空", groups = { AddGroup.class })
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime endTime;

    /**
     * 预定时间(h)
     */
    @NotNull(message = "预定时间(h)不能为空", groups = { AddGroup.class })
    private Float presetTime;

    /**
     * 订单状态（0-待支付 1-已确认 2-已入住 3-已完成 4-已取消）
     */

    private String orderStatus;

    /**
     * 订单总价 单位:分
     */
    private Integer totalPrice;

    /**
     * 优惠劵减免金额（总），单位：分
     *
     */
    private Integer couponPrice;

    /**
     * 优惠劵减免时长，单位：小时
     *
     */
    private Double couponHour;

    /**
     * 预付金额 单位:分
     */
    private Integer prepayAmount;
    /**
     * 预计收入 单位:分
     */
    private Integer revenue;

    /**
     * 入住人电话
     */

    private String mobile;

    /**
     * 优惠劵id
     */
    private Long couponId;

    /**
     * 支付方式（微信/支付宝）
     */
    private String paymentMethod;

    /**
     * 门锁密钥
     */
    private String doorKey;


    private String keyId;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)


    /**
     * 茶室id集合
     */
    private List<Long> tearoomIds;

    private LocalDateTime updateTime;

    private LocalDateTime viewStartTime;

    private LocalDateTime viewEndTime;

    private String isRenew;

    private String oldId;

    private String refundId;

    private String roomStatus;

    private List<String> orderStatusList;
}
